<template>
	<view class="content">
		<view class="success-plate-box">
			<view class="success-icon-box">
				<image src="/pageMember/static/icon4.png" mode=""></image>
				<text>{{ desc.title }}</text>
			</view>
			<text>{{ desc.desc }}</text>
		</view>
		<block v-if="status==3">
			<view class="bottom-but-box" @click="bindOk()">查看订单</view>
			<view class="bottom-but-box c" @click="bindOk()">查看更多</view>
		</block>
		<block v-if="status==4">
			<view class="bottom-but-box" @click="bindOk()">查看订单</view>
			<view class="bottom-but-box c" @click="bindOk()">返回首页</view>
		</block>
		<view class="bottom-but-box" v-if="status==2 || status==1" @click="bindOk()">返回首页</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				status:0, //状态
				info:{ //状态信息
					1:{
						title: '评价成功',
						desc: '恭喜你! 评价成功',
					},
					2:{
						title: '取消成功',
						desc: '订单已成功取消',
					},
					3:{
						title: '申请成功',
						desc: '您的退款/售后申请已提交，请耐心等待',
					},
					4:{
						title: '付款成功',
						desc: '付款成功了，再去逛逛吧',
					}
				}
			}
		},
		onLoad(options) {
			this.status = options.status;
		},
		computed: {
			desc(){
				const { status, info } = this;
				return info[status];
			}
		},
		methods:{
			bindOk(){ //返回上级
				uni.reLaunch({
					url:'/pages/index/index'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		width: 100%;
		height: 100vh;
		font-family: Microsoft YaHei;
		font-weight: bold;
		color: #333333;
		box-sizing: border-box;
		.success-plate-box{
			padding: 200rpx 50rpx;
			padding-bottom: 400rpx;
			font-size: 28rpx;
			font-weight: 400;
			text-align: center;
			.success-icon-box{
				display: flex;flex-direction: column;
				justify-content: center;
				align-items: center;
				font-size: 38rpx;
				margin-bottom: 20rpx;
				image{width: 120rpx;height: 120rpx;margin-bottom: 20rpx;}
			}
		}
		.bottom-but-box{
			width: 40%;
			margin: auto;
			margin-bottom: 50rpx;
			padding: 25rpx 0;
			border-radius: 50rpx;
			background: #000;
			text-align: center;font-size: 30rpx;font-weight: 400;
			color: #FFFFFF;
		}
		.c{
			background: none !important;
			border: 1rpx solid #000 !important;
			color: #000 !important;
		}
	}
</style>